GrabRegion

Syntax

Image:GrabRegion(x, y, width, height, src_img_handler, dest_img_handler)

Description

Captures a rectangular area of an image buffer.

Note

source should be of the same size or bigger than dest.

dest should have be an image-handler or has been initialized with Image:New function.

Example

function main() {
  //declare the variable to become the buffers
  Var:Number mysky, myImage;
 
  Image:New(30, 30 myImage)
 
  //be sure to create the sky.bmp first
  Image:Load("sky.bmp", mysky)
 
  //grab a portion
  Image:GrabRegion(10, 10, 25, 25, mysky, myImage)
}
www.konsolscript.org
© 2005-2011 KonsolScript Labs | All Rights Reversed | Licensed under GNU GPL | Designed by Mj Mendoza IV
http://www.sourceforge.net